from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    def find_wd(self):
        loc=(By.ID,'com.kongfz.app:id/lav_5')
        ele=self.find_dingwei(loc)
        return ele
    def find_user(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.kongfz.app:id/et_login_name")')
        ele=self.find_dingwei(loc)
        return ele
    def find_pas(self):
        loc=(By.XPATH,'//android.widget.EditText[@resource-id="com.kongfz.app:id/et_pwd"]')
        ele=self.find_dingwei(loc)
        return ele
    def find_ys(self):
        loc=(By.ID,'com.kongfz.app:id/iconf_privacy')
        ele=self.find_dingwei(loc)
        return ele
    def find_dl(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tv_confirm_btn"]')
        ele=self.find_dingwei(loc)
        return ele
    def find_souye(self):
        loc=(By.ID,'com.kongfz.app:id/lav_1')
        ele=self.find_dingwei(loc)
        return ele
    def find_zhi(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tv_action_name" and @text="书店"]')
        ele=self.find_huoquyuansu(loc)
        return ele
    def find_wodingdan(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tv_order"]')
        ele=self.find_dingwei(loc).text
        return ele
    def find_qingshuruqueren(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/include_left_title"]')
        ele=self.find_dingwei(loc).text
        return ele

    def find_huadong(self):
        a=877
        b=130
        c=130
        d=730
        self.find_hua(a,b,c,d)
    def find_fan(self):
        self.find_tuichu()



